import { request } from "umi";
export interface IComment {
  hostId: string;
  name: string;
  email: string;
  content: string;
  url: string;
}
export interface ICommentType {
  payload:IComment
}
//获取评论
export function getCommentList(commentId:string,page=1){
  return request(`/api/comment/host/${commentId}`,{
      params: {
          page,
          pageSize:6
      }
  }); 
}

// 提交评论
export function addCommend(payload:ICommentType){
  return request('/api/comment',{
    method: 'POST',
    data:payload
  })

}